/**
 * 报表设计公司(2011)
 */
package com.reportgear.report.view.grid.util;

import java.awt.geom.Rectangle2D;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.reportgear.report.model.ReportModel;
import com.reportgear.report.model.auxiliary.AbstractCRPropList;
import com.reportgear.report.model.auxiliary.ColumnRow;
import com.reportgear.report.model.cell.Cell;
import com.reportgear.report.view.JWorksheet;
import com.reportgear.report.view.grid.selection.GridSelection;
import com.reportgear.report.view.grid.selection.Selection;

/**
 * 网格辅助类
 * 
 * @version 1.0 2011-3-18
 * @author <a herf="lexloo@gmail.com">lexloo</a>
 * @since ANNCSR 2.0
 */
public class GridUtils {
	private static final Logger logger = LoggerFactory.getLogger(GridUtils.class.getName());
	public static double InValidDouble = -1.0001D;
	/**
	 * 没有拖动
	 */
	public static int DRAG_NONE = 0;
	/**
	 * 拖动选择Cell
	 */
	public static int DRAG_CELLSELECTION = 1;
	/**
	 * 拖动右下角选择
	 */
	public static int DRAG_CELLSELECTION_BOTTOMRIGHT_CORNER = 2;
	/**
	 * 拖动修改宽度
	 */
	public static int DRAG_WIDTH = 1;
	/**
	 * 拖动选择列
	 */
	public static int DRAG_SELECT_COLUMNS = 2;
	/**
	 * 拖动修改高度
	 */
	public static int DRAG_HEIGHT = 3;
	/**
	 * 拖动选择行
	 */
	public static int DRAG_SELECT_ROWS = 4;

	public static void caculateElementBounds5(Rectangle2D.Double[] paramArrayOfDouble,
			AbstractCRPropList paramDynamicValueList1, AbstractCRPropList paramDynamicValueList2, double paramDouble1,
			double paramDouble2, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5,
			int paramInt6, int paramInt7, int paramInt8, int paramInt9, int paramInt10, int paramInt11, int paramInt12,
			double paramDouble3) {
		int i;
		if ((paramInt12 <= 0) && (paramInt11 <= 0)) {
			for (i = 0; i < paramArrayOfDouble.length; ++i) {
				paramArrayOfDouble[i].x = InValidDouble;
			}
			if ((paramInt7 <= paramInt3) && (paramInt8 <= paramInt4) && (paramInt7 + paramInt9 > paramInt1)) {
				if (paramInt8 + paramInt10 > paramInt2) {
					paramArrayOfDouble[0].x = paramDynamicValueList1.getRangeValue(paramInt1, paramInt7);
					paramArrayOfDouble[0].y = paramDynamicValueList2.getRangeValue(paramInt2, paramInt8);
					paramArrayOfDouble[0].width = paramDynamicValueList1
							.getRangeValue(paramInt7, paramInt7 + paramInt9);
					paramArrayOfDouble[0].height = paramDynamicValueList2.getRangeValue(paramInt8, paramInt8
							+ paramInt10);
				}
			}
		} else if ((paramInt12 <= 0) && (paramInt11 > 0)) {
			for (i = 0; i < paramArrayOfDouble.length; ++i) {
				paramArrayOfDouble[i].x = InValidDouble;
			}
			if (paramInt7 < paramInt11) {
				if ((paramInt8 <= paramInt12 + paramInt4) && (paramInt8 + paramInt10 > paramInt12 + paramInt2)) {
					if (paramInt7 + paramInt9 >= paramInt5) {
						if (paramInt7 + paramInt9 <= paramInt11) {
							paramArrayOfDouble[0].x = paramDynamicValueList1.getRangeValue(paramInt5, paramInt7);
							paramArrayOfDouble[0].width = paramDynamicValueList1.getRangeValue(paramInt7, paramInt7
									+ paramInt9);
							paramArrayOfDouble[0].y = paramDynamicValueList2.getRangeValue(paramInt6, paramInt8);
							paramArrayOfDouble[0].height = paramDynamicValueList2.getRangeValue(paramInt8, paramInt8
									+ paramInt10);
						} else {
							paramArrayOfDouble[0].x = paramDynamicValueList1.getRangeValue(paramInt5, paramInt7);
							paramArrayOfDouble[0].width = paramDynamicValueList1.getRangeValue(paramInt7, paramInt7
									+ paramInt9);
							paramArrayOfDouble[0].y = paramDynamicValueList2.getRangeValue(paramInt6, paramInt8);
							paramArrayOfDouble[0].height = paramDynamicValueList2.getRangeValue(paramInt8, paramInt8
									+ paramInt10);
							paramArrayOfDouble[1].x = 0.0D;
							paramArrayOfDouble[1].width = paramDynamicValueList1.getRangeValue(paramInt5, paramInt11);
							paramArrayOfDouble[1].y = 0.0D;
							paramArrayOfDouble[1].height = paramDouble2;
							paramArrayOfDouble[2].x = (paramDynamicValueList1.getRangeValue(paramInt5, paramInt7) - paramDynamicValueList1
									.getRangeValue(paramInt11, paramInt11 + paramInt1));
							paramArrayOfDouble[2].width = paramDynamicValueList1.getRangeValue(paramInt7, paramInt7
									+ paramInt9);
							paramArrayOfDouble[2].y = paramDynamicValueList2.getRangeValue(paramInt6, paramInt8);
							paramArrayOfDouble[2].height = paramDynamicValueList2.getRangeValue(paramInt8, paramInt8
									+ paramInt10);
							paramArrayOfDouble[3].x = paramDynamicValueList1.getRangeValue(paramInt5, paramInt11);
							paramArrayOfDouble[3].width = (paramDouble1 - paramArrayOfDouble[3].x);
							paramArrayOfDouble[3].y = 0.0D;
							paramArrayOfDouble[3].height = paramDouble2;
						}
					} else if ((paramInt7 <= paramInt11 + paramInt3) && (paramInt8 <= paramInt12 + paramInt4)
							&& (paramInt7 + paramInt9 > paramInt11 + paramInt1)) {
						if (paramInt8 + paramInt10 > paramInt12 + paramInt2) {
							paramArrayOfDouble[0].x = (paramDynamicValueList1.getRangeValue(paramInt5, paramInt7) - paramDynamicValueList1
									.getRangeValue(paramInt11, paramInt11 + paramInt1));
							paramArrayOfDouble[0].width = paramDynamicValueList1.getRangeValue(paramInt7, paramInt7
									+ paramInt9);
							paramArrayOfDouble[0].y = paramDynamicValueList2.getRangeValue(paramInt6, paramInt8);
							paramArrayOfDouble[0].height = paramDynamicValueList2.getRangeValue(paramInt8, paramInt8
									+ paramInt10);
							paramArrayOfDouble[1].x = paramDynamicValueList1.getRangeValue(paramInt5, paramInt11);
							paramArrayOfDouble[1].width = (paramDouble1 - paramArrayOfDouble[1].x);
							paramArrayOfDouble[1].y = 0.0D;
							paramArrayOfDouble[1].height = paramDouble2;
						}
					}
				}
			}
		} else if ((paramInt12 > 0) && (paramInt11 <= 0)) {
			for (i = 0; i < paramArrayOfDouble.length; ++i) {
				paramArrayOfDouble[i].x = InValidDouble;
			}
			if (paramInt8 < paramInt12) {
				if ((paramInt7 <= paramInt11 + paramInt3) && (paramInt7 + paramInt9 > paramInt11 + paramInt1)) {
					if (paramInt8 + paramInt10 >= paramInt6) {
						if (paramInt8 + paramInt10 <= paramInt12) {
							paramArrayOfDouble[0].x = paramDynamicValueList1.getRangeValue(paramInt5, paramInt7);
							paramArrayOfDouble[0].width = paramDynamicValueList1.getRangeValue(paramInt7, paramInt7
									+ paramInt9);
							paramArrayOfDouble[0].y = paramDynamicValueList2.getRangeValue(paramInt6, paramInt8);
							paramArrayOfDouble[0].height = paramDynamicValueList2.getRangeValue(paramInt8, paramInt8
									+ paramInt10);
						} else {
							paramArrayOfDouble[0].x = paramDynamicValueList1.getRangeValue(paramInt5, paramInt7);
							paramArrayOfDouble[0].width = paramDynamicValueList1.getRangeValue(paramInt7, paramInt7
									+ paramInt9);
							paramArrayOfDouble[0].y = paramDynamicValueList2.getRangeValue(paramInt6, paramInt8);
							paramArrayOfDouble[0].height = paramDynamicValueList2.getRangeValue(paramInt8, paramInt8
									+ paramInt10);
							paramArrayOfDouble[1].x = 0.0D;
							paramArrayOfDouble[1].width = paramDouble1;
							paramArrayOfDouble[1].y = 0.0D;
							paramArrayOfDouble[1].height = paramDynamicValueList2.getRangeValue(paramInt6, paramInt12);
							paramArrayOfDouble[2].x = paramDynamicValueList1.getRangeValue(paramInt5, paramInt7);
							paramArrayOfDouble[2].width = paramDynamicValueList1.getRangeValue(paramInt7, paramInt7
									+ paramInt9);
							paramArrayOfDouble[2].y = (paramDynamicValueList2.getRangeValue(paramInt6, paramInt8) - paramDynamicValueList2
									.getRangeValue(paramInt12, paramInt12 + paramInt2));
							paramArrayOfDouble[2].height = paramDynamicValueList2.getRangeValue(paramInt8, paramInt8
									+ paramInt10);
							paramArrayOfDouble[3].x = 0.0D;
							paramArrayOfDouble[3].width = paramDouble1;
							paramArrayOfDouble[3].y = paramDynamicValueList2.getRangeValue(paramInt6, paramInt12);
							paramArrayOfDouble[3].height = (paramDouble2 - paramArrayOfDouble[3].y);
						}
					} else if ((paramInt7 <= paramInt11 + paramInt3) && (paramInt8 <= paramInt12 + paramInt4)
							&& (paramInt7 + paramInt9 > paramInt11 + paramInt1)) {
						if (paramInt8 + paramInt10 > paramInt12 + paramInt2) {
							paramArrayOfDouble[0].x = paramDynamicValueList1.getRangeValue(paramInt5, paramInt7);
							paramArrayOfDouble[0].width = paramDynamicValueList1.getRangeValue(paramInt7, paramInt7
									+ paramInt9);
							paramArrayOfDouble[0].y = (paramDynamicValueList2.getRangeValue(paramInt6, paramInt8) - paramDynamicValueList2
									.getRangeValue(paramInt12, paramInt12 + paramInt2));
							paramArrayOfDouble[0].height = paramDynamicValueList2.getRangeValue(paramInt8, paramInt8
									+ paramInt10);
							paramArrayOfDouble[1].x = 0.0D;
							paramArrayOfDouble[1].width = paramDouble1;
							paramArrayOfDouble[1].y = paramDynamicValueList2.getRangeValue(paramInt6, paramInt12);
							paramArrayOfDouble[1].height = (paramDouble2 - paramArrayOfDouble[1].y);
						}
					}
				}
			}
		} else {
			for (i = 0; i < paramArrayOfDouble.length; ++i) {
				paramArrayOfDouble[i].x = InValidDouble;
			}
			if (paramInt7 < paramInt11) {
				if (paramInt7 + paramInt9 <= paramInt11) {
					if (paramInt8 < paramInt12) {
						if (paramInt8 + paramInt10 <= paramInt12) {
							paramArrayOfDouble[0].x = paramDynamicValueList1.getRangeValue(paramInt5, paramInt7);
							paramArrayOfDouble[0].width = paramDynamicValueList1.getRangeValue(paramInt7, paramInt7
									+ paramInt9);
							paramArrayOfDouble[0].y = paramDynamicValueList2.getRangeValue(paramInt6, paramInt8);
							paramArrayOfDouble[0].height = paramDynamicValueList2.getRangeValue(paramInt8, paramInt8
									+ paramInt10);
						} else {
							paramArrayOfDouble[0].x = paramDynamicValueList1.getRangeValue(paramInt5, paramInt7);
							paramArrayOfDouble[0].width = paramDynamicValueList1.getRangeValue(paramInt7, paramInt7
									+ paramInt9);
							paramArrayOfDouble[0].y = paramDynamicValueList2.getRangeValue(paramInt6, paramInt8);
							paramArrayOfDouble[0].height = paramDynamicValueList2.getRangeValue(paramInt8, paramInt8
									+ paramInt10);
							paramArrayOfDouble[1].x = 0.0D;
							paramArrayOfDouble[1].width = paramDynamicValueList1.getRangeValue(paramInt5, paramInt11);
							paramArrayOfDouble[1].y = 0.0D;
							paramArrayOfDouble[1].height = paramDynamicValueList2.getRangeValue(paramInt6, paramInt12);
							paramArrayOfDouble[2].x = paramDynamicValueList1.getRangeValue(paramInt5, paramInt7);
							paramArrayOfDouble[2].width = paramDynamicValueList1.getRangeValue(paramInt7, paramInt7
									+ paramInt9);
							paramArrayOfDouble[2].y = (paramDynamicValueList2.getRangeValue(paramInt6, paramInt8) - paramDynamicValueList2
									.getRangeValue(paramInt12, paramInt12 + paramInt2));
							paramArrayOfDouble[2].height = paramDynamicValueList2.getRangeValue(paramInt8, paramInt8
									+ paramInt10);
							paramArrayOfDouble[3].x = 0.0D;
							paramArrayOfDouble[3].width = paramDynamicValueList1.getRangeValue(paramInt5, paramInt11);
							paramArrayOfDouble[3].y = paramDynamicValueList2.getRangeValue(paramInt6, paramInt12);
							paramArrayOfDouble[3].height = (paramDouble2 - paramArrayOfDouble[3].y);
						}
					} else if (paramInt8 < paramInt12 + paramInt4) {
						if (paramInt8 + paramInt10 > paramInt12 + paramInt2) {
							paramArrayOfDouble[0].x = paramDynamicValueList1.getRangeValue(paramInt5, paramInt7);
							paramArrayOfDouble[0].width = paramDynamicValueList1.getRangeValue(paramInt7, paramInt7
									+ paramInt9);
							paramArrayOfDouble[0].y = (paramDynamicValueList2.getRangeValue(paramInt6, paramInt8) - paramDynamicValueList2
									.getRangeValue(paramInt12, paramInt2 + paramInt12));
							paramArrayOfDouble[0].height = paramDynamicValueList2.getRangeValue(paramInt8, paramInt8
									+ paramInt10);
							paramArrayOfDouble[1].x = 0.0D;
							paramArrayOfDouble[1].width = paramDynamicValueList1.getRangeValue(paramInt5, paramInt11);
							paramArrayOfDouble[1].y = paramDynamicValueList2.getRangeValue(paramInt6, paramInt12);
							paramArrayOfDouble[1].height = (paramDouble2 - paramArrayOfDouble[1].y);
						} else if (paramInt8 < paramInt12) {
							if (paramInt8 + paramInt10 <= paramInt12) {
								paramArrayOfDouble[0].x = paramDynamicValueList1.getRangeValue(paramInt5, paramInt7);
								paramArrayOfDouble[0].width = paramDynamicValueList1.getRangeValue(paramInt7, paramInt7
										+ paramInt9);
								paramArrayOfDouble[0].y = paramDynamicValueList2.getRangeValue(paramInt6, paramInt8);
								paramArrayOfDouble[0].height = paramDynamicValueList2.getRangeValue(paramInt8,
										paramInt8 + paramInt10);
								paramArrayOfDouble[1].x = 0.0D;
								paramArrayOfDouble[1].width = paramDynamicValueList1.getRangeValue(paramInt5,
										paramInt11);
								paramArrayOfDouble[1].y = 0.0D;
								paramArrayOfDouble[1].height = paramDynamicValueList2.getRangeValue(paramInt6,
										paramInt12);
								paramArrayOfDouble[2].x = (paramDynamicValueList1.getRangeValue(paramInt5, paramInt7) - paramDynamicValueList1
										.getRangeValue(paramInt11, paramInt11 + paramInt1));
								paramArrayOfDouble[2].width = paramDynamicValueList1.getRangeValue(paramInt7, paramInt7
										+ paramInt9);
								paramArrayOfDouble[2].y = paramDynamicValueList2.getRangeValue(paramInt6, paramInt8);
								paramArrayOfDouble[2].height = paramDynamicValueList2.getRangeValue(paramInt8,
										paramInt8 + paramInt10);
								paramArrayOfDouble[3].x = paramDynamicValueList1.getRangeValue(paramInt5, paramInt11);
								paramArrayOfDouble[3].width = (paramDouble1 - paramArrayOfDouble[3].x);
								paramArrayOfDouble[3].y = 0.0D;
								paramArrayOfDouble[3].height = paramDynamicValueList2.getRangeValue(paramInt6,
										paramInt12);
							} else {
								paramArrayOfDouble[0].x = paramDynamicValueList1.getRangeValue(paramInt5, paramInt7);
								paramArrayOfDouble[0].width = paramDynamicValueList1.getRangeValue(paramInt7, paramInt7
										+ paramInt9);
								paramArrayOfDouble[0].y = paramDynamicValueList2.getRangeValue(paramInt6, paramInt8);
								paramArrayOfDouble[0].height = paramDynamicValueList2.getRangeValue(paramInt8,
										paramInt8 + paramInt10);
								paramArrayOfDouble[1].x = 0.0D;
								paramArrayOfDouble[1].width = paramDynamicValueList1.getRangeValue(paramInt5,
										paramInt11);
								paramArrayOfDouble[1].y = 0.0D;
								paramArrayOfDouble[1].height = paramDynamicValueList2.getRangeValue(paramInt6,
										paramInt12);
								paramArrayOfDouble[2].x = paramDynamicValueList1.getRangeValue(paramInt5, paramInt7);
								paramArrayOfDouble[2].width = paramDynamicValueList1.getRangeValue(paramInt7, paramInt7
										+ paramInt9);
								paramArrayOfDouble[2].y = (paramDynamicValueList2.getRangeValue(paramInt6, paramInt8) - paramDynamicValueList2
										.getRangeValue(paramInt12, paramInt12 + paramInt2));
								paramArrayOfDouble[2].height = paramDynamicValueList2.getRangeValue(paramInt8,
										paramInt8 + paramInt10);
								paramArrayOfDouble[3].x = 0.0D;
								paramArrayOfDouble[3].width = paramDynamicValueList1.getRangeValue(paramInt5,
										paramInt11);
								paramArrayOfDouble[3].y = paramDynamicValueList2.getRangeValue(paramInt6, paramInt12);
								paramArrayOfDouble[3].height = (paramDouble2 - paramArrayOfDouble[3].y);
								paramArrayOfDouble[4].x = (paramDynamicValueList1.getRangeValue(paramInt5, paramInt7) - paramDynamicValueList1
										.getRangeValue(paramInt11, paramInt11 + paramInt1));
								paramArrayOfDouble[4].width = paramDynamicValueList1.getRangeValue(paramInt7, paramInt7
										+ paramInt9);
								paramArrayOfDouble[4].y = paramDynamicValueList2.getRangeValue(paramInt6, paramInt8);
								paramArrayOfDouble[4].height = paramDynamicValueList2.getRangeValue(paramInt8,
										paramInt8 + paramInt10);
								paramArrayOfDouble[5].x = paramDynamicValueList1.getRangeValue(paramInt5, paramInt11);
								paramArrayOfDouble[5].width = (paramDouble1 - paramArrayOfDouble[3].x);
								paramArrayOfDouble[5].y = 0.0D;
								paramArrayOfDouble[5].height = paramDynamicValueList2.getRangeValue(paramInt6,
										paramInt12);
								paramArrayOfDouble[6].x = (paramDynamicValueList1.getRangeValue(paramInt5, paramInt7) - paramDynamicValueList1
										.getRangeValue(paramInt11, paramInt11 + paramInt1));
								paramArrayOfDouble[6].width = paramDynamicValueList1.getRangeValue(paramInt7, paramInt7
										+ paramInt9);
								paramArrayOfDouble[6].y = (paramDynamicValueList2.getRangeValue(paramInt6, paramInt8) - paramDynamicValueList2
										.getRangeValue(paramInt12, paramInt12 + paramInt2));
								paramArrayOfDouble[6].height = paramDynamicValueList2.getRangeValue(paramInt8,
										paramInt8 + paramInt10);
								paramArrayOfDouble[7].x = paramDynamicValueList1.getRangeValue(paramInt5, paramInt11);
								paramArrayOfDouble[7].width = (paramDouble1 - paramArrayOfDouble[3].x);
								paramArrayOfDouble[7].y = paramDynamicValueList2.getRangeValue(paramInt6, paramInt12);
								paramArrayOfDouble[7].height = (paramDouble2 - paramArrayOfDouble[3].y);
							}
						} else if (paramInt8 < paramInt12 + paramInt4) {
							if (paramInt8 + paramInt10 > paramInt12 + paramInt2) {
								paramArrayOfDouble[0].x = paramDynamicValueList1.getRangeValue(paramInt5, paramInt7);
								paramArrayOfDouble[0].width = paramDynamicValueList1.getRangeValue(paramInt7, paramInt7
										+ paramInt9);
								paramArrayOfDouble[0].y = (paramDynamicValueList2.getRangeValue(paramInt6, paramInt8) - paramDynamicValueList2
										.getRangeValue(paramInt12, paramInt12 + paramInt2));
								paramArrayOfDouble[0].height = paramDynamicValueList2.getRangeValue(paramInt8,
										paramInt8 + paramInt10);
								paramArrayOfDouble[1].x = 0.0D;
								paramArrayOfDouble[1].width = paramDynamicValueList1.getRangeValue(paramInt5,
										paramInt11);
								paramArrayOfDouble[1].y = paramDynamicValueList2.getRangeValue(paramInt6, paramInt12);
								paramArrayOfDouble[1].height = (paramDouble2 - paramArrayOfDouble[3].y);
								paramArrayOfDouble[2].x = (paramDynamicValueList1.getRangeValue(paramInt5, paramInt7) - paramDynamicValueList1
										.getRangeValue(paramInt11, paramInt11 + paramInt1));
								paramArrayOfDouble[2].width = paramDynamicValueList1.getRangeValue(paramInt7, paramInt7
										+ paramInt9);
								paramArrayOfDouble[2].y = (paramDynamicValueList2.getRangeValue(paramInt6, paramInt8) - paramDynamicValueList2
										.getRangeValue(paramInt12, paramInt12 + paramInt2));
								paramArrayOfDouble[2].height = paramDynamicValueList2.getRangeValue(paramInt8,
										paramInt8 + paramInt10);
								paramArrayOfDouble[3].x = paramDynamicValueList1.getRangeValue(paramInt5, paramInt11);
								paramArrayOfDouble[3].width = (paramDouble1 - paramArrayOfDouble[3].x);
								paramArrayOfDouble[3].y = paramDynamicValueList2.getRangeValue(paramInt6, paramInt12);
								paramArrayOfDouble[3].height = (paramDouble2 - paramArrayOfDouble[3].y);
							} else if (paramInt7 <= paramInt11 + paramInt3) {
								if (paramInt7 + paramInt9 > paramInt11 + paramInt1) {
									if (paramInt8 < paramInt12) {
										if (paramInt8 + paramInt10 <= paramInt12) {
											paramArrayOfDouble[0].x = (paramDynamicValueList1.getRangeValue(paramInt5,
													paramInt7) - paramDynamicValueList1.getRangeValue(paramInt11,
													paramInt11 + paramInt1));
											paramArrayOfDouble[0].width = paramDynamicValueList1.getRangeValue(
													paramInt7, paramInt7 + paramInt9);
											paramArrayOfDouble[0].y = paramDynamicValueList2.getRangeValue(paramInt6,
													paramInt8);
											paramArrayOfDouble[0].height = paramDynamicValueList2.getRangeValue(
													paramInt8, paramInt8 + paramInt10);
											paramArrayOfDouble[1].x = paramDynamicValueList1.getRangeValue(paramInt5,
													paramInt11);
											paramArrayOfDouble[1].width = (paramDouble1 - paramArrayOfDouble[3].x);
											paramArrayOfDouble[1].y = 0.0D;
											paramArrayOfDouble[1].height = paramDynamicValueList2.getRangeValue(
													paramInt6, paramInt12);
										} else {
											paramArrayOfDouble[0].x = (paramDynamicValueList1.getRangeValue(paramInt5,
													paramInt7) - paramDynamicValueList1.getRangeValue(paramInt11,
													paramInt11 + paramInt1));
											paramArrayOfDouble[0].width = paramDynamicValueList1.getRangeValue(
													paramInt7, paramInt7 + paramInt9);
											paramArrayOfDouble[0].y = paramDynamicValueList2.getRangeValue(paramInt6,
													paramInt8);
											paramArrayOfDouble[0].height = paramDynamicValueList2.getRangeValue(
													paramInt8, paramInt8 + paramInt10);
											paramArrayOfDouble[1].x = paramDynamicValueList1.getRangeValue(paramInt5,
													paramInt11);
											paramArrayOfDouble[1].width = (paramDouble1 - paramArrayOfDouble[3].x);
											paramArrayOfDouble[1].y = 0.0D;
											paramArrayOfDouble[1].height = paramDynamicValueList2.getRangeValue(
													paramInt6, paramInt12);
											paramArrayOfDouble[2].x = paramArrayOfDouble[0].x;
											paramArrayOfDouble[2].width = paramArrayOfDouble[0].width;
											paramArrayOfDouble[2].y = (paramDynamicValueList2.getRangeValue(paramInt6,
													paramInt8) - paramDynamicValueList2.getRangeValue(paramInt12,
													paramInt12 + paramInt2));
											paramArrayOfDouble[2].height = paramDynamicValueList2.getRangeValue(
													paramInt8, paramInt8 + paramInt10);
											paramArrayOfDouble[3].x = paramDynamicValueList1.getRangeValue(paramInt5,
													paramInt11);
											paramArrayOfDouble[3].width = (paramDouble1 - paramArrayOfDouble[3].x);
											paramArrayOfDouble[3].y = paramDynamicValueList2.getRangeValue(paramInt6,
													paramInt12);
											paramArrayOfDouble[3].height = (paramDouble2 - paramArrayOfDouble[3].y);
										}
									} else if (paramInt8 < paramInt12 + paramInt4) {
										if (paramInt8 + paramInt10 > paramInt12 + paramInt2) {
											paramArrayOfDouble[0].x = (paramDynamicValueList1.getRangeValue(paramInt5,
													paramInt7) - paramDynamicValueList1.getRangeValue(paramInt11,
													paramInt11 + paramInt1));
											paramArrayOfDouble[0].width = paramDynamicValueList1.getRangeValue(
													paramInt7, paramInt7 + paramInt9);
											paramArrayOfDouble[0].y = (paramDynamicValueList2.getRangeValue(paramInt6,
													paramInt8) - paramDynamicValueList2.getRangeValue(paramInt12,
													paramInt12 + paramInt2));
											paramArrayOfDouble[0].height = paramDynamicValueList2.getRangeValue(
													paramInt8, paramInt8 + paramInt10);
											paramArrayOfDouble[1].x = paramDynamicValueList1.getRangeValue(paramInt5,
													paramInt11);
											paramArrayOfDouble[1].width = (paramDouble1 - paramArrayOfDouble[1].x);
											paramArrayOfDouble[1].y = paramDynamicValueList2.getRangeValue(paramInt6,
													paramInt12);
											paramArrayOfDouble[1].height = (paramDouble2 - paramArrayOfDouble[1].y);
										}
									}
								}
							}
						}
					}
				}
			}
		}
		if (paramDouble3 == 1.0D) {
			return;
		}
		for (i = 0; i < paramArrayOfDouble.length; ++i) {
			if (paramArrayOfDouble[i].x == InValidDouble) {
				continue;
			}
			paramArrayOfDouble[i].x *= paramDouble3;
			paramArrayOfDouble[i].y *= paramDouble3;
			paramArrayOfDouble[i].width *= paramDouble3;
			paramArrayOfDouble[i].height *= paramDouble3;
		}
	}

	public static void caculateElementBounds2(Rectangle2D paramRectangle2D, AbstractCRPropList paramDynamicValueList1,
			AbstractCRPropList paramDynamicValueList2, int paramInt1, int paramInt2, int paramInt3, int paramInt4,
			int paramInt5, int paramInt6, int paramInt7, int paramInt8, boolean paramBoolean, double paramDouble) {
		if ((paramInt6 > paramInt4) && (paramBoolean)) {
			paramRectangle2D.setRect(-1.0D, -1.0D, InValidDouble, InValidDouble);
			return;
		}
		double d1 = paramDynamicValueList2.getRangeValue(paramInt2, paramInt6);
		double d3 = paramDynamicValueList2.getRangeValue(paramInt6, paramInt6 + paramInt8);
		if ((paramInt5 > paramInt3) && (paramBoolean)) {
			paramRectangle2D.setRect(-1.0D, -1.0D, InValidDouble, InValidDouble);
			return;
		}
		double d2 = paramDynamicValueList1.getRangeValue(paramInt1, paramInt5);
		double d4 = paramDynamicValueList1.getRangeValue(paramInt5, paramInt5 + paramInt7);
		paramRectangle2D.setRect(d1 * paramDouble, d2 * paramDouble, d3 * paramDouble, d4 * paramDouble);
	}

	//
	// public static void adjustFrozenCellElementPaint(Rectangle2D
	// paramRectangle2D1, DynamicValueList paramDynamicValueList1,
	// DynamicValueList paramDynamicValueList2, int paramInt1, int paramInt2,
	// int paramInt3, int paramInt4, CellElement paramCellElement, Rectangle2D
	// paramRectangle2D2) {
	// double d;
	// if (paramInt4 > 0) {
	// d = paramDynamicValueList2.getRangeValue(0, paramInt4);
	// if (paramCellElement.getColumn() < paramInt4) {
	// paramRectangle2D1.setRect(paramRectangle2D1.getX(),
	// paramRectangle2D1.getY(), Math.min(paramRectangle2D2.getWidth(), d -
	// paramRectangle2D2.getX()), paramRectangle2D1.getHeight());
	// } else {
	// paramRectangle2D1.setRect(Math.max(d - paramRectangle2D2.getX(),
	// paramRectangle2D1.getX()), paramRectangle2D1.getY(),
	// paramRectangle2D1.getWidth(), paramRectangle2D1.getHeight());
	// }
	// }
	// if (paramInt3 <= 0) {
	// return;
	// }
	// d = paramDynamicValueList1.getRangeValue(0, paramInt3);
	// if (paramCellElement.getColumn() < paramInt4) {
	// paramRectangle2D1.setRect(paramRectangle2D1.getX(),
	// paramRectangle2D1.getY(), paramRectangle2D1.getWidth(),
	// Math.min(paramRectangle2D1.getHeight(), d - paramRectangle2D2.getY()));
	// } else {
	// paramRectangle2D1.setRect(paramRectangle2D1.getX(), Math.max(d -
	// paramRectangle2D2.getY(), paramRectangle2D1.getY()),
	// paramRectangle2D1.getWidth(), paramRectangle2D1.getHeight());
	// }
	// }
	//
	// public static Object[] getAboveFloatElementCursor(ReportPane
	// paramReportPane, double paramDouble1, double paramDouble2) {
	// FloatElement localFloatElement;
	// Cursor localCursor;
	// Object[] arrayOfObject = null;
	// Report localReport = paramReportPane.getReport();
	// GridSelection localGridSelection = paramReportPane.getGridSelection();
	// Iterator localIterator = localReport.floatIterator();
	// while (localIterator.hasNext()) {
	// localFloatElement = (FloatElement) localIterator.next();
	// double[] arrayOfDouble = caculateFloatElementLocations(localFloatElement,
	// ReportHelper.getColumnWidthList(localReport),
	// ReportHelper.getRowHeightList(localReport),
	// paramReportPane.getGrid().getVerticalValue(),
	// paramReportPane.getGrid().getHorizontalValue());
	// double d1 = arrayOfDouble[0];
	// double d2 = arrayOfDouble[1];
	// double d3 = arrayOfDouble[2];
	// double d4 = arrayOfDouble[3];
	// Rectangle2D.Double localDouble = new Rectangle2D.Double(arrayOfDouble[0],
	// arrayOfDouble[1], localFloatElement.getSize().getWidth(),
	// localFloatElement.getSize().getHeight());
	// if (!(localGridSelection.containFloatName(localFloatElement.getName())))
	// {
	// if (!(localDouble.contains(paramDouble1, paramDouble2))) {
	// continue;
	// }
	// arrayOfObject = new Object[]{localFloatElement, new Cursor(13)};
	// }
	// localCursor = null;
	// if (localGridSelection.getFloatNameCount() == 1) {
	// Rectangle2D[] arrayOfRectangle2D = {new Rectangle2D.Double(d1 - 3.0D, d2
	// - 3.0D, 6.0D, 6.0D), new Rectangle2D.Double((d1 + d3) / 2.0D - 3.0D, d2 -
	// 3.0D, 6.0D, 6.0D), new Rectangle2D.Double(d3 - 3.0D, d2 - 3.0D, 6.0D,
	// 6.0D), new Rectangle2D.Double(d3 - 3.0D, (d2 + d4) / 2.0D - 3.0D, 6.0D,
	// 6.0D), new Rectangle2D.Double(d3 - 3.0D, d4 - 3.0D, 6.0D, 6.0D), new
	// Rectangle2D.Double((d1 + d3) / 2.0D - 3.0D, d4 - 3.0D, 6.0D, 6.0D), new
	// Rectangle2D.Double(d1 - 3.0D, d4 - 3.0D, 6.0D, 6.0D), new
	// Rectangle2D.Double(d1 - 3.0D, (d2 + d4) / 2.0D - 3.0D, 6.0D, 6.0D)};
	// int[] arrayOfInt = {6, 8, 7, 11, 5, 9, 4, 10};
	// for (int i = 0; i < arrayOfRectangle2D.length; ++i) {
	// if (!(arrayOfRectangle2D[i].contains(paramDouble1, paramDouble2))) {
	// continue;
	// }
	// localCursor = new Cursor(arrayOfInt[i]);
	// break;
	// }
	// }
	// if ((localDouble.contains(paramDouble1, paramDouble2)) && (localCursor ==
	// null)) {
	// arrayOfObject = new Object[]{localFloatElement, new Cursor(13)};
	// }
	// if (localCursor != null) {
	// return new Object[]{localFloatElement, localCursor};
	// }
	// }
	// return arrayOfObject;
	// }
	//
	// public static double[] caculateFloatElementLocations(FloatElement
	// paramFloatElement, DynamicValueList paramDynamicValueList1,
	// DynamicValueList paramDynamicValueList2, int paramInt1, int paramInt2) {
	// double d1 = paramDynamicValueList1.getRangeValue(paramInt2,
	// paramFloatElement.getColumn()) + paramFloatElement.getLeftDistance();
	// double d2 = paramDynamicValueList2.getRangeValue(paramInt1,
	// paramFloatElement.getRow()) + paramFloatElement.getTopDistance();
	// double d3 = d1 + paramFloatElement.getSize().getWidth();
	// double d4 = d2 + paramFloatElement.getSize().getHeight();
	// return new double[]{d1, d2, d3, d4};
	// }
	//

	/**
	 * 选择单元格
	 * 
	 * @param worksheet
	 *            工作薄
	 * @param column
	 *            行
	 * @param row
	 *            列
	 */
	public static void doSelectCell(JWorksheet worksheet, int column, int row) {
		ReportModel reportModel = worksheet.getReportModel();
		GridSelection gridSel = worksheet.getGridSelection();
		gridSel.setType(GridSelection.Type.CELL);

		Selection sel = gridSel.getEditSelection();
		Cell cell = reportModel.getCell(column, row);
		if (cell.isMerged()) {
			cell = reportModel.getCell(cell.getMergedToCR());
		}

		gridSel.setEditBounds(cell.getColumn(), cell.getRow(), cell.getColumnSpan(), cell.getRowSpan());
		gridSel.setOnlySelection(cell.getColumn(), cell.getRow(), cell.getColumnSpan(), cell.getRowSpan());

		worksheet.fireGridSelectionChanged();
	}

	// public static ElementsTransferable
	// caculateElementsTransferable(ReportPane paramReportPane) {
	// Object localObject1;
	// Object localObject2;
	// ElementsTransferable localElementsTransferable = new
	// ElementsTransferable();
	// Report localReport = paramReportPane.getReport();
	// GridSelection localGridSelection = paramReportPane.getGridSelection();
	// int i = localGridSelection.getType();
	// if (i == 1) {
	// FloatElement localFloatElement1;
	// localObject1 = new FloatElementsClip();
	// int j = localGridSelection.getFloatNameCount();
	// int k = 2147483647;
	// int l = 2147483647;
	// for (int i1 = 0; i1 < j; ++i1) {
	// localObject2 = localGridSelection.getFloatName(i1);
	// localFloatElement1 = localReport.getFloatElement((String) localObject2);
	// if (localFloatElement1 == null) {
	// continue;
	// }
	// k = Math.min(k, localFloatElement1.getColumn());
	// l = Math.min(localFloatElement1.getRow(), l);
	// }
	// for (i1 = 0; i1 < j; ++i1) {
	// localObject2 = localGridSelection.getFloatName(i1);
	// localFloatElement1 = localReport.getFloatElement((String) localObject2);
	// if (localFloatElement1 == null) {
	// continue;
	// }
	// try {
	// FloatElement localFloatElement2 = (FloatElement)
	// localFloatElement1.clone();
	// localFloatElement2.setColumn(localFloatElement1.getColumn() - k);
	// localFloatElement2.setRow(localFloatElement1.getRow() - l);
	// ((FloatElementsClip) localObject1).addFloatElement(localFloatElement2);
	// } catch (CloneNotSupportedException localCloneNotSupportedException) {
	// logger.warn(localCloneNotSupportedException.getMessage(),
	// localCloneNotSupportedException);
	// } catch (Exception localException) {
	// logger.warn(localException.getMessage(), localException);
	// }
	// }
	// localElementsTransferable.addObject(localObject1);
	// } else {
	// localObject1 = localGridSelection.getFirstCellRectangle();
	// CellElementsClip localCellElementsClip = new
	// CellElementsClip(((Rectangle) localObject1).width, ((Rectangle)
	// localObject1).height);
	// Rectangle localRectangle = new Rectangle(((Rectangle) localObject1).x,
	// ((Rectangle) localObject1).y, ((Rectangle) localObject1).width,
	// ((Rectangle) localObject1).height);
	// Iterator localIterator = localReport.intersect(((Rectangle)
	// localObject1).x, ((Rectangle) localObject1).y, ((Rectangle)
	// localObject1).width, ((Rectangle) localObject1).height);
	// while (localIterator.hasNext()) {
	// CellElement localCellElement = (CellElement) localIterator.next();
	// localObject2 = new Rectangle(localCellElement.getColumn(),
	// localCellElement.getRow(), localCellElement.getColumnSpan(),
	// localCellElement.getRowSpan());
	// if ((localRectangle.equals(localObject2)) ||
	// (localRectangle.contains((Rectangle) localObject2))) {
	// localCellElementsClip.addCellElement(localCellElement.deriveCellElement(localCellElement.getColumn()
	// - ((Rectangle) localObject1).x, localCellElement.getRow() - ((Rectangle)
	// localObject1).y));
	// }
	// if (!(localRectangle.intersects((Rectangle) localObject2))) {
	// continue;
	// }
	// }
	// localElementsTransferable.addObject(localCellElementsClip);
	// }
	// return ((ElementsTransferable) (ElementsTransferable)
	// localElementsTransferable);
	// }
	// public static void pasteElementsCopyToReport(CellElementsClip
	// paramCellElementsClip, Report paramReport, int paramInt1, int paramInt2,
	// int paramInt3, int paramInt4, int paramInt5, int paramInt6) {
	// int i = paramCellElementsClip.getCellElementCount();
	// for (int j = 0; j < i; ++j) {
	// CellElement localCellElement = paramCellElementsClip.getCellElement(j);
	// localCellElement = localCellElement.deriveCellElement(paramInt1 +
	// localCellElement.getColumn(), paramInt2 + localCellElement.getRow());
	// if ((localCellElement.getColumn() >= paramInt3 + paramInt5) ||
	// (localCellElement.getRow() >= paramInt4 + paramInt6) ||
	// (localCellElement.getColumn() < paramInt3)) {
	// continue;
	// }
	// if (localCellElement.getRow() < paramInt4) {
	// continue;
	// }
	// paramReport.addCellElement(localCellElement);
	// }
	// }
	// public static void intelliElementsIterating(ReportPane paramReportPane,
	// Rectangle paramRectangle1, Rectangle paramRectangle2, Rectangle
	// paramRectangle3, boolean paramBoolean1, boolean paramBoolean2) {
	// IntelliElements localIntelliElements = new
	// IntelliElements(paramReportPane, paramRectangle1, paramRectangle2,
	// paramRectangle3, paramBoolean1, paramBoolean2);
	// localIntelliElements.setAction(0);
	// localIntelliElements.setStyleSupported(true);
	// // localIntelliElements.doIntelliAction();
	// }
	// public static ColumnRow getLastColumnRowOfReportPane(ReportPane
	// paramReportPane) {
	// int i = paramReportPane.getGrid().getHorizontalValue();
	// int j = paramReportPane.getGrid().getHorizontalExtent();
	// int k = paramReportPane.getReport().getColumnCount() - 1;
	// int l = i + j + 1;
	// if (!(paramReportPane.isColumnEndless())) {
	// l = Math.min(l, k - paramReportPane.getFrozenColumn());
	// }
	// l += paramReportPane.getFrozenColumn();
	// ++l;
	// int i1 = paramReportPane.getGrid().getVerticalValue();
	// int i2 = paramReportPane.getGrid().getVerticalExtent();
	// int i3 = paramReportPane.getReport().getRowCount() - 1;
	// int i4 = i1 + i2 + 1;
	// if (!(paramReportPane.isRowEndless())) {
	// i4 = Math.min(i4, i3 - paramReportPane.getFrozenRow());
	// }
	// i4 += paramReportPane.getFrozenRow();
	// return ColumnRow.valueOf(? ? ?, ++i4);
	// }
	public static ColumnRow getAdjustLastColumnRowOfReportPane(JWorksheet workSheet) {
		ReportModel report = workSheet.getReportModel();
		return ColumnRow.valueOf(Math.max(1, report.getColumnCount()), Math.max(1, report.getRowCount()));
	}

	// public static void calculateForcedPagingOfCellElement(List paramList,
	// ReportPane paramReportPane, CellElement paramCellElement, double
	// paramDouble1, double paramDouble2, double paramDouble3, double
	// paramDouble4) {
	// double d1;
	// double d2;
	// Object localObject;
	// if (paramCellElement == null) {
	// return;
	// }
	// Report localReport = paramReportPane.getReport();
	// DynamicValueList localDynamicValueList1 =
	// ReportHelper.getColumnWidthList(localReport);
	// DynamicValueList localDynamicValueList2 =
	// ReportHelper.getRowHeightList(localReport);
	// int i = paramReportPane.getSize().width;
	// int j = paramReportPane.getSize().height;
	// CellPageAttr localCellPageAttr = paramCellElement.getCellPageAttr();
	// if ((localCellPageAttr != null) &&
	// (localCellPageAttr.isPageAfterColumn())) {
	// d1 =
	// localDynamicValueList1.getRangeValueFromZero(paramCellElement.getColumn()
	// + paramCellElement.getColumnSpan());
	// if (d1 >= paramDouble3) {
	// d1 -= paramDouble1;
	// if (d1 < paramDouble3) {
	// d1 = -1.0D;
	// }
	// }
	// localObject = new Line2D.Double(d1, 0.0D, d1, j);
	// if (!(paramList.contains(localObject))) {
	// paramList.add(localObject);
	// }
	// }
	// if ((localCellPageAttr != null) &&
	// (localCellPageAttr.isPageBeforeColumn())) {
	// d1 =
	// localDynamicValueList1.getRangeValueFromZero(paramCellElement.getColumn());
	// if (d1 >= paramDouble3) {
	// d1 -= paramDouble1;
	// if (d1 < paramDouble3) {
	// d1 = -1.0D;
	// }
	// }
	// localObject = new Line2D.Double(d1, 0.0D, d1, j);
	// if (!(paramList.contains(localObject))) {
	// paramList.add(localObject);
	// }
	// }
	// if ((localCellPageAttr != null) && (localCellPageAttr.isPageAfterRow()))
	// {
	// d2 =
	// localDynamicValueList2.getRangeValueFromZero(paramCellElement.getRow() +
	// paramCellElement.getRowSpan());
	// if (d2 >= paramDouble4) {
	// d2 -= paramDouble2;
	// if (d2 < paramDouble4) {
	// d2 = -1.0D;
	// }
	// }
	// localObject = new Line2D.Double(0.0D, d2, i, d2);
	// if (!(paramList.contains(localObject))) {
	// paramList.add(localObject);
	// }
	// }
	// if ((localCellPageAttr != null) && (localCellPageAttr.isPageBeforeRow()))
	// {
	// d2 =
	// localDynamicValueList2.getRangeValueFromZero(paramCellElement.getRow());
	// if (d2 >= paramDouble4) {
	// d2 -= paramDouble2;
	// if (d2 < paramDouble4) {
	// d2 = -1.0D;
	// }
	// }
	// localObject = new Line2D.Double(0.0D, d2, i, d2);
	// if (!(paramList.contains(localObject))) {
	// paramList.add(localObject);
	// }
	// }
	// for (int k = 0; k < paramList.size(); ++k) {
	// localObject = (Line2D) paramList.get(k);
	// for (int l = k + 1; l < paramList.size(); ++l) {
	// Line2D localLine2D = (Line2D) paramList.get(l);
	// if ((localLine2D.getX1() != ((Line2D) localObject).getX1()) ||
	// (localLine2D.getX2() != ((Line2D) localObject).getX2()) ||
	// (localLine2D.getY1() != ((Line2D) localObject).getY1()) ||
	// (localLine2D.getY2() != ((Line2D) localObject).getY2())) {
	// continue;
	// }
	// paramList.remove(l);
	// }
	// }
	// }
	// public static void dealCellSelection(ReportPane paramReportPane) {
	// Report localReport = paramReportPane.getReport();
	// GridSelection localGridSelection = paramReportPane.getGridSelection();
	// int i = localGridSelection.getType();
	// if (i == 1) {
	// return;
	// }
	// Rectangle localRectangle = localGridSelection.getEditRectangle();
	// int j = localRectangle.x;
	// int k = localRectangle.y;
	// int l = localRectangle.width;
	// int i1 = localRectangle.height;
	// CellElement localCellElement = localReport.getCellElement(j, k);
	// if (localCellElement != null) {
	// l = localCellElement.getColumnSpan();
	// i1 = localCellElement.getRowSpan();
	// }
	// localRectangle.width = l;
	// localRectangle.height = i1;
	// }
	//

	/**
	 * 获取网格选择行Index列表
	 * 
	 * @param gridSelection
	 *            网格选择集
	 * @return 行Index列表
	 */
	public static List<Integer> getGridSelectionRowIndex(GridSelection gridSelection) {
		List<Integer> result = new ArrayList<Integer>();
		for (int i = 0; i < gridSelection.getCellSelectionCount(); i++) {
			Selection rect = gridSelection.getCellSelection(i);

			for (int j = 0; j < rect.getRowSpan(); j++) {
				int k = rect.getRow() + j;
				if (result.contains(k)) {
					continue;
				}

				result.add(k);
			}
		}
		Collections.sort(result);

		return result;
	}

	/**
	 * 获取网格选择列Index列表
	 * 
	 * @param gridSelection
	 *            网格选择集
	 * @return 列Index列表
	 */
	public static List<Integer> getGridSelectionColumnIndex(GridSelection gridSelection) {
		List<Integer> result = new ArrayList<Integer>();
		for (int i = 0; i < gridSelection.getCellSelectionCount(); i++) {
			Selection rect = gridSelection.getCellSelection(i);
			for (int j = 0; j < rect.getColumSpan(); ++j) {
				int k = rect.getColumn() + j;
				if (result.contains(k)) {
					continue;
				}

				result.add(k);
			}
		}
		Collections.sort(result);

		return result;
	}
	// private static class IntelliElements {
	//
	// public static final int DIRECTION_UNDEF = -1;
	// public static final int DIRECTION_UP_TO_DOWN = 0;
	// public static final int DIRECTION_DOWN_TO_UP = 1;
	// public static final int DIRECTION_LEFT_TO_RIGHT = 2;
	// public static final int DIRECTION_RIGHT_TO_LEFT = 3;
	// public static final int ACTION_SEQUENCING = 0;
	// public static final int ACTION_REPLICATION = 1;
	// public static final int FORMULA_NONE_PARA_SAME = -1;
	// public static final int FORMULA_HOR_PARA_SAME = 0;
	// public static final int FORMULA_VER_PARA_SAME = 1;
	// private int direction = -1;
	// private int action = 0;
	// private boolean isStyleSupported = true;
	// // private ReportPane reportPane;
	// // private Report report;
	// private Rectangle oldCellRectangle;
	// private Rectangle editRectangle;
	// private Rectangle dragCellRectangle;
	// private boolean isNeedRepaint;
	// private boolean isDataChanged;
	// public IntelliElements(ReportPane paramReportPane, Rectangle
	// paramRectangle1, Rectangle paramRectangle2, Rectangle paramRectangle3,
	// boolean paramBoolean1, boolean paramBoolean2) {
	// this.reportPane = paramReportPane;
	// this.report = paramReportPane.getReport();
	// this.oldCellRectangle = paramRectangle2;
	// this.editRectangle = paramRectangle1;
	// this.dragCellRectangle = paramRectangle3;
	// this.isNeedRepaint = paramBoolean1;
	// this.isDataChanged = paramBoolean2;
	// }
	// public void setAction(int paramInt) {
	// this.action = paramInt;
	// }
	//
	// public void setStyleSupported(boolean paramBoolean) {
	// this.isStyleSupported = paramBoolean;
	// }
	//
	// public void doIntelliAction() {
	// int i;
	// GridSelection localGridSelection2;
	// int j;
	// int k;
	// int l;
	// int i1;
	// int i2;
	// CellElement localCellElement1;
	// CellElement localCellElement3;
	// analyzeDirection();
	// defineRules();
	// if (this.action == 1) {
	// doReplication();
	// return;
	// }
	// if (this.direction == 0) {
	// for (i = this.oldCellRectangle.x;; ++i) {
	// if (i >= this.oldCellRectangle.x + this.oldCellRectangle.width) {
	// break label1624;
	// }
	// localGridSelection2 = this.reportPane.getGridSelection();
	// localGridSelection2.getCellRectangle(0);
	// j = 0;
	// k = localGridSelection2.getCellRectangleCount();
	// for (l = 0; l < k; ++l) {
	// j = localGridSelection2.getCellRectangle(l).height;
	// }
	// if (k > 1) {
	// return;
	// }
	// l = this.oldCellRectangle.y + j;
	// i1 = this.dragCellRectangle.y + this.dragCellRectangle.height;
	// for (i2 = l; i2 < i1; ++i2) {
	// Object localObject1;
	// localCellElement1 = this.report.getCellElement(i, i2 -
	// this.oldCellRectangle.height);
	// if (localCellElement1 == null) {
	// localCellElement1 = new CellElement();
	// }
	// if (localCellElement1.getValue() instanceof DSColumn) {
	// localObject1 = (DSColumn) localCellElement1.getValue();
	// CellElement localCellElement2 = new CellElement(i, i2);
	// localCellElement2.setValue(localObject1);
	// applyStyle(localCellElement2, localCellElement1);
	// localCellElement2.setCellExpandAttr(localCellElement1.getCellExpandAttr());
	// this.report.addCellElement(localCellElement2);
	// } else if (localCellElement1.getValue() instanceof Integer) {
	// localObject1 = (Integer) localCellElement1.getValue();
	// int i3 = ((Integer) localObject1).intValue() + 1;
	// localObject1 = new Integer(i3);
	// CellElement localCellElement4 = new CellElement(i, i2);
	// localCellElement4.setValue(localObject1);
	// applyStyle(localCellElement4, localCellElement1);
	// this.report.addCellElement(localCellElement4);
	// } else if (localCellElement1.getValue() instanceof Double) {
	// localObject1 = (Double) localCellElement1.getValue();
	// double d = ((Double) localObject1).doubleValue() + 1.0D;
	// localObject1 = new Double(d);
	// CellElement localCellElement5 = new CellElement(i, i2);
	// localCellElement5.setValue(localObject1);
	// applyStyle(localCellElement5, localCellElement1);
	// this.report.addCellElement(localCellElement5);
	// } else if (localCellElement1.getValue() instanceof Formula) {
	// localObject1 = (Formula) localCellElement1.getValue();
	// localObject1 = generateSimpleFormula((Formula) localObject1, 1, 0);
	// localCellElement3 = new CellElement(i, i2);
	// localCellElement3.setValue(localObject1);
	// applyStyle(localCellElement3, localCellElement1);
	// this.report.addCellElement(localCellElement3);
	// } else {
	// try {
	// localObject1 = (CellElement) localCellElement1.clone();
	// localCellElement3 = new CellElement(i, i2);
	// localCellElement3.setValue(((CellElement) localObject1).getValue());
	// this.report.addCellElement(localCellElement3);
	// } catch (CloneNotSupportedException localCloneNotSupportedException1) {
	// logger.warn(localCloneNotSupportedException1.getMessage(),
	// localCloneNotSupportedException1);
	// }
	// }
	// }
	// }
	// }
	// if (this.direction == 1) {
	// for (i = this.oldCellRectangle.x;; ++i) {
	// if (i >= this.oldCellRectangle.x + this.oldCellRectangle.width) {
	// break label1624;
	// }
	// }
	// }
	// if (this.direction == 2) {
	// for (i = this.oldCellRectangle.y;; ++i) {
	// if (i >= this.oldCellRectangle.y + this.oldCellRectangle.height) {
	// break label1624;
	// }
	// localGridSelection2 = this.reportPane.getGridSelection();
	// localGridSelection2.getCellRectangle(0);
	// j = 0;
	// k = localGridSelection2.getCellRectangleCount();
	// for (l = 0; l < k; ++l) {
	// j = localGridSelection2.getCellRectangle(l).width;
	// }
	// if (k > 1) {
	// return;
	// }
	// l = this.oldCellRectangle.x + j;
	// i1 = this.dragCellRectangle.x + this.dragCellRectangle.width;
	// for (i2 = l; i2 < i1; ++i2) {
	// Object localObject2;
	// localCellElement1 = this.report.getCellElement(i2 -
	// this.oldCellRectangle.width, i);
	// if (localCellElement1 == null) {
	// localCellElement1 = new CellElement();
	// }
	// if (localCellElement1.getValue() instanceof DSColumn) {
	// localObject2 = (DSColumn) localCellElement1.getValue();
	// localCellElement3 = new CellElement(i2, i);
	// try {
	// localCellElement3.setValue(((DSColumn) localObject2).clone());
	// } catch (CloneNotSupportedException localCloneNotSupportedException4) {
	// logger.warn(localCloneNotSupportedException4.getMessage(),
	// localCloneNotSupportedException4);
	// }
	// applyStyle(localCellElement3, localCellElement1);
	// localCellElement3.setCellExpandAttr(localCellElement1.getCellExpandAttr());
	// this.report.addCellElement(localCellElement3);
	// } else if (localCellElement1.getValue() instanceof Integer) {
	// localObject2 = (Integer) localCellElement1.getValue();
	// localCellElement3 = new CellElement(i2, i);
	// localCellElement3.setValue(localObject2);
	// applyStyle(localCellElement3, localCellElement1);
	// this.report.addCellElement(localCellElement3);
	// } else if (localCellElement1.getValue() instanceof Double) {
	// localObject2 = (Double) localCellElement1.getValue();
	// localCellElement3 = new CellElement(i2, i);
	// localCellElement3.setValue(localObject2);
	// applyStyle(localCellElement3, localCellElement1);
	// this.report.addCellElement(localCellElement3);
	// } else if (localCellElement1.getValue() instanceof Formula) {
	// localObject2 = (Formula) localCellElement1.getValue();
	// localObject2 = generateSimpleFormula((Formula) localObject2, 1, 2);
	// localCellElement3 = new CellElement(i2, i);
	// localCellElement3.setValue(localObject2);
	// applyStyle(localCellElement3, localCellElement1);
	// this.report.addCellElement(localCellElement3);
	// } else {
	// try {
	// localObject2 = (CellElement) localCellElement1.clone();
	// localCellElement3 = new CellElement(i2, i);
	// localCellElement3.setValue(((CellElement) localObject2).getValue());
	// this.report.addCellElement(localCellElement3);
	// } catch (CloneNotSupportedException localCloneNotSupportedException2) {
	// logger.warn(localCloneNotSupportedException2.getMessage(),
	// localCloneNotSupportedException2);
	// }
	// }
	// }
	// }
	// }
	// if (this.direction == 3) {
	// for (i = this.oldCellRectangle.y; i < this.oldCellRectangle.y +
	// this.oldCellRectangle.height; ++i) {
	// localGridSelection2 = this.reportPane.getGridSelection();
	// localGridSelection2.getCellRectangle(0);
	// j = localGridSelection2.getCellRectangleCount();
	// if (j > 1) {
	// return;
	// }
	// k = this.dragCellRectangle.x;
	// l = this.oldCellRectangle.x;
	// for (i1 = k; i1 < l; ++i1) {
	// Object localObject3;
	// i2 = i1 - k;
	// localCellElement1 = this.report.getCellElement(l + i2 %
	// this.oldCellRectangle.width, i);
	// if (localCellElement1 == null) {
	// localCellElement1 = new CellElement();
	// }
	// if (localCellElement1.getValue() instanceof DSColumn) {
	// localObject3 = (DSColumn) localCellElement1.getValue();
	// localCellElement3 = new CellElement(i1, i);
	// try {
	// localCellElement3.setValue(((DSColumn) localObject3).clone());
	// } catch (CloneNotSupportedException localCloneNotSupportedException5) {
	// logger.warn(localCloneNotSupportedException5.getMessage(),
	// localCloneNotSupportedException5);
	// }
	// applyStyle(localCellElement3, localCellElement1);
	// localCellElement3.setCellExpandAttr(localCellElement1.getCellExpandAttr());
	// this.report.addCellElement(localCellElement3);
	// } else if (localCellElement1.getValue() instanceof Integer) {
	// localObject3 = (Integer) localCellElement1.getValue();
	// localCellElement3 = new CellElement(i1, i);
	// localCellElement3.setValue(localObject3);
	// applyStyle(localCellElement3, localCellElement1);
	// this.report.addCellElement(localCellElement3);
	// } else if (localCellElement1.getValue() instanceof Double) {
	// localObject3 = (Double) localCellElement1.getValue();
	// localCellElement3 = new CellElement(i1, i);
	// localCellElement3.setValue(localObject3);
	// applyStyle(localCellElement3, localCellElement1);
	// this.report.addCellElement(localCellElement3);
	// } else if (localCellElement1.getValue() instanceof Formula) {
	// localObject3 = (Formula) localCellElement1.getValue();
	// localCellElement3 = new CellElement(i1, i);
	// localCellElement3.setValue(localObject3);
	// applyStyle(localCellElement3, localCellElement1);
	// this.report.addCellElement(localCellElement3);
	// } else {
	// try {
	// localObject3 = (CellElement) localCellElement1.clone();
	// localObject3 = ((CellElement) localObject3).deriveCellElement(i1, i);
	// this.report.addCellElement((CellElement) localObject3);
	// } catch (CloneNotSupportedException localCloneNotSupportedException3) {
	// logger.warn(localCloneNotSupportedException3.getMessage(),
	// localCloneNotSupportedException3);
	// }
	// }
	// }
	// }
	// }
	// label1624:
	// GridSelection
	//
	//
	//
	// localGridSelection1 = this.reportPane.getGridSelection();
	// localGridSelection1.setType(0);
	// localGridSelection1.setEditBounds(this.editRectangle.x,
	// this.editRectangle.y, this.editRectangle.width,
	// this.editRectangle.height);
	// localGridSelection1.setEditBounds(this.dragCellRectangle.x,
	// this.dragCellRectangle.y, this.dragCellRectangle.width,
	// this.dragCellRectangle.height);
	// this.isNeedRepaint = true;
	// this.isDataChanged = true;
	// this.reportPane.fireGridSelectionChanged();
	// if (!(this.isDataChanged)) {
	// return;
	// }
	// this.reportPane.repaint();
	// }
	// private void doReplication() {
	// ElementsTransferable localElementsTransferable;
	// CellElementsClip localCellElementsClip;
	// Object localObject;
	// if (this.direction == 0) {
	// if (this.dragCellRectangle.height == this.oldCellRectangle.height) {
	// this.isNeedRepaint = true;
	// } else if (this.dragCellRectangle.height > this.oldCellRectangle.height)
	// {
	// localElementsTransferable =
	// GridUtils.caculateElementsTransferable(this.reportPane);
	// localCellElementsClip = null;
	// localObject = localElementsTransferable.getFirstObject();
	// if ((localObject != null) && (localObject instanceof CellElementsClip)) {
	// localCellElementsClip = (CellElementsClip) localObject;
	// }
	// if (localCellElementsClip != null) {
	// int i = this.oldCellRectangle.y + this.oldCellRectangle.height;
	// while (i < this.dragCellRectangle.y + this.dragCellRectangle.height) {
	// GridUtils.pasteElementsCopyToReport(localCellElementsClip,
	// this.reportPane.getReport(), this.oldCellRectangle.x, i,
	// this.oldCellRectangle.x, i, this.oldCellRectangle.width,
	// Math.min(this.oldCellRectangle.height, this.dragCellRectangle.y +
	// this.dragCellRectangle.height - i));
	// i += this.oldCellRectangle.height;
	// }
	// }
	// GridSelection localGridSelection1 = this.reportPane.getGridSelection();
	// localGridSelection1.setType(0);
	// localGridSelection1.setEditBounds(this.editRectangle.x,
	// this.editRectangle.y, this.editRectangle.width,
	// this.editRectangle.height);
	// localGridSelection1.setEditBounds(this.dragCellRectangle.x,
	// this.dragCellRectangle.y, this.dragCellRectangle.width,
	// this.dragCellRectangle.height);
	// this.isDataChanged = true;
	// }
	// } else if (this.direction == 1) {
	// localElementsTransferable =
	// GridUtils.caculateElementsTransferable(this.reportPane);
	// localCellElementsClip = null;
	// localObject = localElementsTransferable.getFirstObject();
	// if ((localObject != null) && (localObject instanceof CellElementsClip)) {
	// localCellElementsClip = (CellElementsClip) localObject;
	// }
	// if (localCellElementsClip != null) {
	// int j = this.oldCellRectangle.y - this.oldCellRectangle.height;
	// while (j + this.oldCellRectangle.height > this.dragCellRectangle.y) {
	// GridUtils.pasteElementsCopyToReport(localCellElementsClip,
	// this.reportPane.getReport(), this.oldCellRectangle.x, j,
	// this.oldCellRectangle.x, Math.max(j, this.dragCellRectangle.y),
	// this.oldCellRectangle.width, Math.min(this.oldCellRectangle.height,
	// this.oldCellRectangle.height - (this.dragCellRectangle.y - j)));
	// j -= this.oldCellRectangle.height;
	// }
	// }
	// GridSelection localGridSelection2 = this.reportPane.getGridSelection();
	// localGridSelection2.setType(0);
	// localGridSelection2.setEditBounds(this.editRectangle.x,
	// this.editRectangle.y, this.editRectangle.width,
	// this.editRectangle.height);
	// localGridSelection2.setEditBounds(this.dragCellRectangle.x,
	// this.dragCellRectangle.y, this.dragCellRectangle.width,
	// this.dragCellRectangle.height);
	// this.isDataChanged = true;
	// } else if (this.direction == 2) {
	// if (this.dragCellRectangle.width == this.oldCellRectangle.width) {
	// this.isNeedRepaint = true;
	// } else if (this.dragCellRectangle.width > this.oldCellRectangle.width) {
	// localElementsTransferable =
	// GridUtils.caculateElementsTransferable(this.reportPane);
	// localCellElementsClip = null;
	// localObject = localElementsTransferable.getFirstObject();
	// if ((localObject != null) && (localObject instanceof CellElementsClip)) {
	// localCellElementsClip = (CellElementsClip) localObject;
	// }
	// if (localCellElementsClip != null) {
	// int k = this.oldCellRectangle.x + this.oldCellRectangle.width;
	// while (k < this.dragCellRectangle.x + this.dragCellRectangle.width) {
	// GridUtils.pasteElementsCopyToReport(localCellElementsClip,
	// this.reportPane.getReport(), k, this.oldCellRectangle.y, k,
	// this.oldCellRectangle.y, Math.min(this.oldCellRectangle.width,
	// this.dragCellRectangle.x + this.dragCellRectangle.width - k),
	// this.oldCellRectangle.height);
	// k += this.oldCellRectangle.width;
	// }
	// }
	// GridSelection localGridSelection3 = this.reportPane.getGridSelection();
	// localGridSelection3.setType(0);
	// localGridSelection3.setEditBounds(this.editRectangle.x,
	// this.editRectangle.y, this.editRectangle.width,
	// this.editRectangle.height);
	// localGridSelection3.setEditBounds(this.dragCellRectangle.x,
	// this.dragCellRectangle.y, this.dragCellRectangle.width,
	// this.dragCellRectangle.height);
	// this.isDataChanged = true;
	// }
	// } else if (this.direction == 3) {
	// localElementsTransferable =
	// GridUtils.caculateElementsTransferable(this.reportPane);
	// localCellElementsClip = null;
	// localObject = localElementsTransferable.getFirstObject();
	// if ((localObject != null) && (localObject instanceof CellElementsClip)) {
	// localCellElementsClip = (CellElementsClip) localObject;
	// }
	// if (localCellElementsClip != null) {
	// int l = this.oldCellRectangle.x - this.oldCellRectangle.width;
	// while (l + this.oldCellRectangle.width > this.dragCellRectangle.x) {
	// GridUtils.pasteElementsCopyToReport(localCellElementsClip,
	// this.reportPane.getReport(), l, this.oldCellRectangle.y, Math.max(l,
	// this.dragCellRectangle.x), this.oldCellRectangle.y,
	// Math.min(this.oldCellRectangle.width, this.oldCellRectangle.width -
	// (this.dragCellRectangle.x - l)), this.oldCellRectangle.height);
	// l -= this.oldCellRectangle.width;
	// }
	// }
	// GridSelection localGridSelection4 = this.reportPane.getGridSelection();
	// localGridSelection4.setType(0);
	// localGridSelection4.setEditBounds(this.editRectangle.x,
	// this.editRectangle.y, this.editRectangle.width,
	// this.editRectangle.height);
	// localGridSelection4.setEditBounds(this.dragCellRectangle.x,
	// this.dragCellRectangle.y, this.dragCellRectangle.width,
	// this.dragCellRectangle.height);
	// this.isDataChanged = true;
	// }
	// this.reportPane.fireGridSelectionChanged();
	// if (!(this.isDataChanged)) {
	// return;
	// }
	// this.reportPane.repaint();
	// }
	//
	// private void analyzeDirection() {
	// if ((this.dragCellRectangle.x == this.oldCellRectangle.x) &&
	// (this.dragCellRectangle.width == this.oldCellRectangle.width)) {
	// if (this.dragCellRectangle.y == this.oldCellRectangle.y) {
	// this.direction = 0;
	// } else {
	// if (this.dragCellRectangle.y >= this.oldCellRectangle.y) {
	// return;
	// }
	// this.direction = 1;
	// }
	// } else {
	// if ((this.dragCellRectangle.y != this.oldCellRectangle.y) ||
	// (this.dragCellRectangle.height != this.oldCellRectangle.height)) {
	// return;
	// }
	// if (this.dragCellRectangle.x == this.oldCellRectangle.x) {
	// this.direction = 2;
	// } else {
	// if (this.dragCellRectangle.x >= this.oldCellRectangle.x) {
	// return;
	// }
	// this.direction = 3;
	// }
	// }
	// }
	// private void defineRules() {
	// }
	// private boolean isRowElementsTypeSame(int paramInt) {
	// CellElement localCellElement1 =
	// this.report.getCellElement(this.oldCellRectangle.x, paramInt);
	// if ((localCellElement1 == null) || (localCellElement1.getValue() ==
	// null)) {
	// return false;
	// }
	// Class localClass = localCellElement1.getValue().getClass();
	// for (int i = this.oldCellRectangle.x; i < this.oldCellRectangle.x +
	// this.oldCellRectangle.width; ++i) {
	// CellElement localCellElement2 = this.report.getCellElement(i, paramInt);
	// if (localCellElement2 == null) {
	// continue;
	// }
	// if (localClass != localCellElement2.getValue().getClass()) {
	// return false;
	// }
	// }
	// return true;
	// }
	//
	// private boolean isColumnElementsTypeSame(int paramInt) {
	// CellElement localCellElement1 = this.report.getCellElement(paramInt,
	// this.oldCellRectangle.y);
	// if ((localCellElement1 == null) || (localCellElement1.getValue() ==
	// null)) {
	// return false;
	// }
	// Class localClass = localCellElement1.getValue().getClass();
	// for (int i = this.oldCellRectangle.y; i < this.oldCellRectangle.y +
	// this.oldCellRectangle.height; ++i) {
	// CellElement localCellElement2 = this.report.getCellElement(paramInt, i);
	// if (localCellElement2 == null) {
	// continue;
	// }
	// if (localClass != localCellElement2.getValue().getClass()) {
	// return false;
	// }
	// }
	// return true;
	// }
	// private DSColumn getNextDSColumn(DSColumn paramDSColumn) {
	// if (paramDSColumn == null) {
	// return null;
	// }
	// DSColumn localDSColumn = null;
	// try {
	// localDSColumn = (DSColumn) paramDSColumn.clone();
	// } catch (CloneNotSupportedException localCloneNotSupportedException) {
	// localCloneNotSupportedException.printStackTrace();
	// return null;
	// }
	// TableData localTableData = null;
	// localTableData = this.report.getTableData(paramDSColumn.getDSName());
	// if (localTableData == null) {
	// return null;
	// }
	// try {
	// int i = localTableData.getColumnCount();
	// for (int j = 0; j < i; ++j) {
	// String str = localTableData.getColumnName(j);
	// if ((!(str.equals(paramDSColumn.getColumnName()))) || (j == i - 1)) {
	// continue;
	// }
	// localDSColumn.setColumn(TableDataColumn.createColumn(localTableData.getColumnName(j
	// + 1)));
	// return localDSColumn;
	// }
	// } catch (TableDataException localTableDataException) {
	// FRContext.getLogger().log(Level.WARNING,
	// localTableDataException.getMessage(), localTableDataException);
	// }
	// return null;
	// }
	//
	// private DSColumn getPreviousDSColumn(DSColumn paramDSColumn) {
	// if (paramDSColumn == null) {
	// return null;
	// }
	// DSColumn localDSColumn = null;
	// try {
	// localDSColumn = (DSColumn) paramDSColumn.clone();
	// } catch (CloneNotSupportedException localCloneNotSupportedException) {
	// localCloneNotSupportedException.printStackTrace();
	// return null;
	// }
	// TableData localTableData = null;
	// localTableData = this.report.getTableData(paramDSColumn.getDSName());
	// if (localTableData == null) {
	// return null;
	// }
	// try {
	// int i = localTableData.getColumnCount();
	// for (int j = 0; j < i; ++j) {
	// String str = localTableData.getColumnName(j);
	// if ((!(str.equals(paramDSColumn.getColumnName()))) || (j == 0)) {
	// continue;
	// }
	// localDSColumn.setColumn(TableDataColumn.createColumn(localTableData.getColumnName(j
	// - 1)));
	// return localDSColumn;
	// }
	// } catch (TableDataException localTableDataException) {
	// FRContext.getLogger().log(Level.WARNING,
	// localTableDataException.getMessage(), localTableDataException);
	// }
	// return null;
	// }
	//
	// private boolean whetherIsLastOne(DSColumn paramDSColumn) {
	// if ((paramDSColumn == null) || (paramDSColumn.getDSName() == null)) {
	// return false;
	// }
	// TableData localTableData = null;
	// localTableData = this.report.getTableData(paramDSColumn.getDSName());
	// return TableDataColumn.isLastColumn(paramDSColumn.getColumn(),
	// localTableData);
	// }
	//
	// private boolean whetherIsFirstOne(DSColumn paramDSColumn) {
	// if ((paramDSColumn == null) || (paramDSColumn.getDSName() == null)) {
	// return false;
	// }
	// TableData localTableData = null;
	// localTableData = this.report.getTableData(paramDSColumn.getDSName());
	// return TableDataColumn.isFirstColumn(paramDSColumn.getColumn(),
	// localTableData);
	// }
	//
	// private Formula generateSimpleFormula(Formula paramFormula, int
	// paramInt1, int paramInt2) {
	// Formula localFormula;
	// int k;
	// try {
	// localFormula = (Formula) paramFormula.clone();
	// } catch (CloneNotSupportedException localCloneNotSupportedException) {
	// localFormula = new Formula();
	// FRContext.getLogger().log(Level.WARNING,
	// localCloneNotSupportedException.getMessage(),
	// localCloneNotSupportedException);
	// }
	// String str1 = paramFormula.getContent();
	// StringBuffer localStringBuffer = new StringBuffer();
	// String str2 = "[a-z|A-Z]+[0-9]+";
	// Pattern localPattern = Pattern.compile(str2);
	// Matcher localMatcher = localPattern.matcher(str1);
	// for (int i = 0; localMatcher.find(); i = k) {
	// int j;
	// int l;
	// int i4;
	// int i6;
	// do {
	// j = localMatcher.start();
	// k = localMatcher.end();
	// l = str1.charAt(j - 1);
	// } while (l == 36);
	// String str3 = str1.substring(j, k);
	// ColumnRow localColumnRow1 = BaseUtils.convertCellStringToColumnRow(str3);
	// int i1 = localColumnRow1.getColumn();
	// int i2 = localColumnRow1.getRow();
	// int i3 = i1;
	// int i5 = i2;
	// if (paramInt2 == 0) {
	// i5 += paramInt1;
	// } else if (paramInt2 == 2) {
	// i3 += paramInt1;
	// } else if (paramInt2 == 1) {
	// i5 -= paramInt1;
	// if (i5 < 0) {
	// i6 = 0;
	// }
	// } else if (paramInt2 == 3) {
	// i3 -= paramInt1;
	// if (i3 < 0) {
	// i4 = 0;
	// }
	// }
	// ColumnRow localColumnRow2 = ColumnRow.valueOf(i4, i6);
	// String str4 = BaseUtils.convertColumnRowToCellString(localColumnRow2);
	// localStringBuffer.append(str1.substring(i, j));
	// localStringBuffer.append(str4);
	// }
	// localStringBuffer.append(str1.substring(i, str1.length()));
	// localFormula.setContent(localStringBuffer.toString());
	// return localFormula;
	// }
	//
	// private void applyStyle(CellElement paramCellElement1, CellElement
	// paramCellElement2) {
	// if (!(this.isStyleSupported)) {
	// return;
	// }
	// paramCellElement1.setStyle(paramCellElement2.getStyle());
	// }
	//
	// private void applyExpandAttr(CellElement paramCellElement1, CellElement
	// paramCellElement2, boolean paramBoolean) {
	// Object localObject1 = paramCellElement1.getValue();
	// Object localObject2 = paramCellElement2.getValue();
	// if ((!(localObject1 instanceof DSColumn)) || (!(localObject2 instanceof
	// DSColumn))) {
	// return;
	// }
	// DSColumn localDSColumn1 = (DSColumn) localObject1;
	// DSColumn localDSColumn2 = (DSColumn) localObject2;
	// CellExpandAttr localCellExpandAttr1 =
	// paramCellElement1.getCellExpandAttr();
	// CellExpandAttr localCellExpandAttr2 =
	// paramCellElement2.getCellExpandAttr();
	// localCellExpandAttr1.setDirection(localCellExpandAttr2.getDirection());
	// }
	// }
	// }
}
